<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>JavaScript八进制与十六进制数</title>
    </head>
    <body>
        <h3>JavaScript八进制与十六进制数</h3>
        <hr />
        <script>
		    //八进制数
            var x1 = 020;
			//十六进制数
			var x2 = 0xAF;
            alert('八进制数020='+x1+'\n十六进制数0xAF='+x2);
        </script>
    </body>
</html>